package com.zhong.gang.pda.ui.action.receive.controller;

import android.view.View;

import com.zhong.gang.applib.controller.ImgController;
import com.zhong.gang.applib.ui.adapter.AddImgAdapter;
import com.zhong.gang.applib.config.Config;
import com.zhong.gang.pda.databinding.ActivityReceiveBinding;
import com.zhong.gang.pda.ui.action.HuoBean;
import com.zhong.gang.pda.ui.action.HuoPersenter;
import com.zhong.gang.pda.ui.action.receive.ReceiveAct;

public abstract class BaseReceiveController extends HuoPersenter{
    public AddImgAdapter addImgAdapter;
    protected ActivityReceiveBinding binding;
    protected ReceiveAct act;
    protected int id;
    public ImgController imgController;
    protected HuoBean huoBean;

    public BaseReceiveController(ReceiveAct act,int id) {
        this.act = act;
        this.id = id;
        this.binding = act.bind;
        binding.shouhuo.setText(binding.delete);
        imgController = new ImgController();
        binding.recyclerView.setNestedScrollingEnabled(false);
        addImgAdapter = imgController.initImgAdapter(act,binding.recyclerView, Config.CAMREA);
    }

    public void setScalesMsg(HuoBean data){
        this.huoBean = data;
        binding.carStatus.setText(data.getCarStatus() == 1?"场内":"场外");
        binding.carNum.setText(data.getCarNum());
        binding.huoFeet.setData(data);
    }

    public void onViewClicked(View view){}
}
